package com.etc.service.impl;

import cn.hutool.crypto.SecureUtil;
import com.etc.dao.AdminDao;
import com.etc.dao.impl.AdminDaoImpl;
import com.etc.entity.Admin;
import com.etc.service.AdminService;
import com.etc.util.DBUtil;

import java.util.List;

public class AdminServiceImpl implements AdminService {

    private AdminDao adminDao = new AdminDaoImpl();
    @Override
    public Admin getAdmin(String adminname, String adminpwd) {
        //这里的amindpwd是明文，变成md5处理后的
        String md5str = SecureUtil.md5(adminpwd);
        Admin admin = adminDao.getAdmin(adminname, md5str);
        return admin;
    }
}
